package com.twu.biblioteca;

import java.util.List;


public class BookListFormatter {
    private final List<Book> targetList;

    public BookListFormatter(List<Book> targetList) {
        this.targetList = targetList;
    }

    public String format() {
        StringBuilder sb = new StringBuilder();
        for (Book book : targetList) {
            sb.append(book.number + "." + book.title);
            sb.append("\n");
        }
        return sb.toString();
    }
}


